using System.ComponentModel.DataAnnotations;

namespace EIMS.Models.AccountViewModels
{
    public class ChangePasswordViewModel
    {
        [Required(ErrorMessage = "当前密码不能为空")]
        [DataType(DataType.Password)]
        [Display(Name = "当前密码")]
        public string CurrentPassword { get; set; }

        [Required(ErrorMessage = "新密码不能为空")]
        [StringLength(100, ErrorMessage = "{0}的长度必须在{2}到{1}个字符之间。", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "确认新密码")]
        [Compare("NewPassword", ErrorMessage = "两次输入的新密码不一致")]
        public string ConfirmPassword { get; set; }
    }
} 